
public class Euro {
    private int value;

    public int getValue() {
        return value;
    }


    public Euro(int value) {
        this.value = value;
    }

    /*
    public boolean equals (Object otherObject) {
        if(!(otherObject instanceof Euro)){
            return false;
        }
        Euro otherEuro = (Euro) otherObject;

        if(otherEuro.value == this.value){
            return true;
        }
        return false;
    }
    */

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Euro euro = (Euro) o;

        if (value != euro.value) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return value;
    }

    public Euro plus(Euro euro) {
        Euro addedEuro = new Euro(0);
        addedEuro.value = this.value + euro.value;
        return addedEuro;
    }

    public Euro plus(Euro euro1, Euro euro2) {
        Euro addedEuro = new Euro(0);
        addedEuro.value = this.value + euro1.value + euro2.value;
        return addedEuro;
    }
}
